package com.example.trabajofinal.activity;

import com.example.trabajofinal.R;

import android.app.Activity;
import android.content.Intent;
import android.view.Menu;
import android.view.MenuInflater;
import android.view.MenuItem;

public class CommonActivity extends Activity {

	@Override
	public boolean onCreateOptionsMenu(Menu menu) {

		MenuInflater inflater = new MenuInflater(this);
		inflater.inflate(R.menu.main, menu);
		return true;
	}

	@Override
	public boolean onOptionsItemSelected(MenuItem item) {
		switch (item.getItemId()) {
		case R.id.cursos:
			Intent ic = new Intent(this, CursosActivity.class);
			startActivity(ic);
			finish();
			return true;

		case R.id.misCursos:
			Intent imc = new Intent(this, MisCursosActivity.class);
			startActivity(imc);
			finish();
			return true;			
			
		case R.id.mapsIT:
			Intent im = new Intent(this, MapaItActivity.class);
			startActivity(im);
			finish();
			return true;

		}

		return false;
	}
}
